<link href="/public/admin/css/bootstrap-tagsinput.css" rel="stylesheet">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- PAGE CONTENT BEGINS -->
    <div class="row">


        <div class="col-xs-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>搜索</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">

                        <div class="table-responsive">
                            <form class="form-search" method="get" action="<?=url('video.type/index')?>" role="form">
                                <table>
                                    <tr>
                                        <td>分类名称:<input class="form-control" name="type_name" id="type_name"
                                                        value="<?=$search['type_name']?>" type="text"
                                                        placeholder="请输入分类名称" style=" width:200px"/></td>

                                        <td>
                                            <div class="input-group">
                                                <button type="submit" style="margin-top: 42%"
                                                        class="btn form-control btn-sm btn-primary">
                                                    搜索
                                                </button>
                                            </div>
                                        </td>
                                    </tr>

                                </table>

                            </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>


        <div class="col-xs-12">
            <div class="ibox-content">
                <div class="row">
                    <div class="tableTools-container">
                        <a title="添加分类设置" href="<?=url('video.type/create')?>" class="btn btn-sm btn-success"><i
                                class=" fa fa-plus"></i>添加分类设置</a>


                    </div>


                    <div class="table-responsive">

                        <table id="simple-table" class="table table-striped">
                            <thead>
                            <tr>
                                <th class="center">
                                    <label class="pos-rel">
                                        <input type="checkbox" class="ace"/>
                                        <span class="lbl"></span>
                                    </label>
                                </th>
                                <th>ID</th>
                                <th>分类名称</th>
                                <th>图片</th>
                                <th>排序</th>
                                <th>标签</th>

                                <th>操作</th>


                            </tr>
                            </thead>
                            <form id="mini_list">
                                <tbody>
                                <?php foreach($list as $val){ ?>
                                <tr>
                                    <td class="center">
                                        <label class="pos-rel">
                                            <input id="type_id_<?=$val->type_id;?>" name="type_id[]"
                                                   value="<?=$val->type_id;?>" type="checkbox" class="ace"/>
                                            <span class="lbl"></span>
                                        </label>
                                    </td>

                                    <td><?= $val->type_id ?></td>
                                    <td><?=$val->type_name?></td>
                                    <td><img width="80" src="/attachs/uploads/<?=$val->photo?>"/></td>
                                    <td><?=$val->orderby?></td>
                                    <td><?=empty($tags[$val->type_id]) ? '' : $tags[$val->type_id]->names ?></td>
                                    <td>
                                        <div class="hidden-sm hidden-xs btn-group">
                                            <a title="编辑分类设置"
                                               href="<?=url('video.type/edit','type_id='.$val->type_id)?>"
                                               class="btn btn-xs btn-info"><i class=" fa fa-edit bigger-120"></i>编辑</a>
                                            <a title="删除分类设置" mini="act"
                                               href="<?=url('video.type/delete','type_id='.$val->type_id)?>"
                                               class="btn btn-xs btn-warning"><i
                                                    class="fa fa-trash bigger-120"></i>删除</a>
                                        </div>
                                    </td>
                                </tr>
                                <?php } ?>

                                </tbody>
                            </form>
                        </table>

                        <div>
                            <?php echo $page; ?>
                        </div>
                    </div><!-- /.row -->


                </div><!-- /.main-container -->


            </div>
        </div>
    </div>
</div>
